package com.diana.controller;

import com.diana.service.QueueMainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 * 序列字典表 前端控制器
 * </p>
 *
 * @author anzhi
 * @since 2019-05-04
 */
@RestController
@RequestMapping("/queueMain")
public class QueueMainController {

    @Autowired
    private QueueMainService queueMainService;

    @RequestMapping("/createQueue")
    public String createQueue(@RequestParam Map<String,Object> map){
        return queueMainService.createQueue(map);
    }

    @RequestMapping("/getQueueValue")
    public String getQueueValue(@RequestParam(required = false,value = "queueName") String queueName){
        return queueMainService.getQueueValue(queueName);
    }

    @RequestMapping("/getQueueValueNoPre")
    public String getQueueValueNoPre(@RequestParam(required = false,value = "queueName") String queueName){
        return queueMainService.getQueueValueNoPre(queueName);
    }
}

